//
//  HZWPictureTableViewCell.m
//  开心一刻
//
//  Created by lanou on 16/4/7.
//  Copyright © 2016年 刘洋. All rights reserved.
//

#import "HZWPictureTableViewCell.h"

@implementation HZWPictureTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.aoturImage = [[UIImageView alloc]initWithFrame:CGRectMake(15, 15, 40, 40)];
        self.aoturImage.layer.masksToBounds = YES;
        self.aoturImage.layer.cornerRadius = 20;
        
        self.aoturName = [[UILabel alloc]initWithFrame:CGRectMake(65, 20, 100, 20)];
        self.aoturName.font = [UIFont systemFontOfSize:13];
        
        
        self.contentLabel =[[UILabel alloc]initWithFrame:CGRectMake(15, 70,KedWidth-30, 200)];
        self.contentLabel.font =[UIFont systemFontOfSize:15];
        self.contentLabel.numberOfLines = 0;
        
        self.style = [[UILabel alloc]initWithFrame:CGRectMake(15, 275, 100, 20)];
        self.style.font = [UIFont systemFontOfSize:13];
        
        [self.contentView addSubview:_aoturImage];
        [self.contentView addSubview:_aoturName];
        [self.contentView addSubview:_contentLabel];
        [self.contentView addSubview:_style];
    }
    return self;
}
+(CGFloat)cellHeghtForRow:(HZWPictureModel *)model
{
    CGRect bounds = [model.content boundingRectWithSize:CGSizeMake(KedWidth-30, 1000) options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:15] forKey:NSFontAttributeName] context:nil];
    return 70+bounds.size.height+22;
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
